<template>
  <div class="home">
    <h1>HOme组件</h1>
    <button @click="handleSubmit">按钮</button>
    <About></About>
  </div>
</template>

<script>

import { mapMutations } from 'vuex'
import EventBus from '../eventBus/index'
import About from './About'
export default {
  name: 'Home',
  components: {
    About
  },
  data() {
    return {
      msg: '我是Home组件信息'
    }
  },
  mounted() {

  },
  methods: {
    ...mapMutations(['setMsg']),
    handleSubmit() {
      // this.setMsg(this.msg)
      EventBus.$emit('toAbout', this.msg)
    }
  }
}
</script>
